package com.example.raidball;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.SlidingDrawer;

public class MainActivity extends Activity {
	Context context;
	Button play;
	SlidingDrawer drawer_settings;
	Button menu_btn;
	Player player;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		context = this;
		player = new Player();
		// les boutons ne seront pas dans cette activity mais sur une fille de
		// mainActivity
		setContentView(R.layout.activity_main);

		Button tryMenu = (Button) findViewById(R.id.select_level);
		tryMenu.setOnClickListener(new View.OnClickListener() {
			public void onClick(View arg0) {
				Intent intent = new Intent(context, World_chooser.class);
				intent.putExtra("isworldLock", player.isworldLock);
				intent.putExtra("islvlLockWorld1", player.islvlLockWorld1);
				intent.putExtra("islvlLockWorld2", player.islvlLockWorld2);
				intent.putExtra("scoreWorld1", player.scoreWorld1);
				intent.putExtra("scoreWordl2", player.scoreWorld2);
				startActivity(intent);
				
				
			}
		});

		/*drawer_settings = (SlidingDrawer) findViewById(R.id.sliding_drawer);
		menu_btn = (Button) findViewById(R.id.menu_btn);
		menu_btn.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				drawer_settings.close();
				Intent intent = new Intent(context, MainActivity.class);
				startActivity(intent);
			}
		});*/

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
